View Issue Details

IDProjectCategoryView StatusLast Update
0001846T99X171.00 SKB EagleSW Issuepublic2024-04-05 13:19
Reporter(ALTech) JunGyu Kim Assigned To(ALTech) Younkwang Jung Due Date2023-12-11 19:10
PrioritynormalSeveritys4-minorReproducibilityN/A
Status closedResolutionreopened 
Summary0001846: [Smart3][ATV10][VCS] Request that the command is performed automatically when booting
DescriptionCurrently, we are testing Amlogic's patch related with VCS FW.
The issue is sometimes preview video is not playing in Home menu.
Jira ticket : https://jira.skbroadband.com/browse/BPM-25466

For this patch to work, the command below must be executed when start-up.
==========================================
echo 2 > /sys/class/codec_mm/tvp_enable
==========================================

Currently, we are testing this command by executing it directly after booting, but we will need to build FW to start automatically at booting soon.
Please proceed the command is performed automatically when booting.

Please note that this work does not need to be commit to bitbucket right now. Currently we need to keep it in the form of a patch file for future.
We will let you know if we need to commit this patch in the future.

Thank you.
Kim
TagsNo tags attached.
Attach Tags

Users monitoring this issue

Activities

(SW) Jason Ling

2023-12-07 19:37

developer   ~0014680

Hi Jungyu,

I have one question, is this common issue? I think Intek also has this issue.
Why didn't Amlogic provide the official patch?

According to your request, this command will be added in init.rc.
But init.rc contains many phases.

if this command should be handle by manufacturer, Which phase does Amlogic recommend to add? e.g. on post-fs, on boot?

Thanks,
Jason

(ALTech) JunGyu Kim

2023-12-08 09:31

developer   ~0014683

Hi Jason.

1. This issue is common issue. Intek has same issue.
    For this patch, Amlogic says they cannot give an official patch. The reason is that manufacturers use different dts files.

2. I ask to AML Korea your question, they said you can add command when everything is completed, not at booting time.
    I don't know exactly what phase is exist on init.rc, if there are boot complete phase, I think we can add command on this phase.

Thank you.
Kim

(SW) Jason Ling

2023-12-08 17:12

developer   ~0014690

Hi Jungyu,

Please check below,

diff --git a/rootdir/init.rc b/rootdir/init.rc
index 718cba488..97082870c 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -781,6 +781,8 @@ on boot
     chown system system /sys/kernel/ipv4/tcp_rmem_max
     chown root radio /proc/cmdline
 
+ write /sys/class/codec_mm/tvp_enable 2
+
     # Define default initial receive window size in segments.
     setprop net.tcp.default_init_rwnd 60

Thanks,
Jason

(ALTech) JunGyu Kim

2023-12-11 15:26

developer   ~0014700

Last edited: 2023-12-11 15:27

Hi Jason. I ask to Amlogic how to verify tvp_enable was set.
1. After set tvp_enable to 2, memfree / cmafree will decrese like below.
====================================
BFX-AT100:/ # cat /proc/meminfo| grep -i free
MemFree: 689792 kB
CmaFree: 589116 kB
BFX-AT100:/ # echo 2 > /sys/class/codec_mm/tvp_enable
BFX-AT100:/ # cat /proc/meminfo| grep -i free
MemFree: 450372 kB
CmaFree: 348424 kB
====================================

2. I think Amlogic's guide is not clear, so I checked tvp_enable and it operates as follows.
2-1 Before echo 2 > /sys/class/codec_mm/tvp_enable
BFX-AT100:/ # cat sys/class/codec_mm/tvp_enable
tvp_flag=16
tvp ref count=0


2-2 After echo 2 > /sys/class/codec_mm/tvp_enable
BFX-AT100:/ # echo 2 > /sys/class/codec_mm/tvp_enable
BFX-AT100:/ # cat sys/class/codec_mm/tvp_enable
tvp_flag=18
tvp ref count=1

I think we can verify the value was set through "tvp flag" or "tvp refcount".

3. I have tested your patch but it seems not working. Could you please check it again?

Thank you.
Kim

(SW) Jason Ling

2023-12-11 17:03

developer   ~0014703

Hi Jungyu,

Please also apply below patch in device/amlogic/common

diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
index 69b915c..fb0c897 100644
--- a/sepolicy/file_contexts
+++ b/sepolicy/file_contexts
@@ -165,6 +165,7 @@
 /sys/class/video/axis u:object_r:sysfs_video:s0
 /sys/class/video/axis_pip u:object_r:sysfs_video:s0
 /sys/class/tsync/enable u:object_r:sysfs_video:s0
+/sys/class/codec_mm/tvp_enable u:object_r:sysfs_video:s0
 /sys/class/audiodsp/digital_raw u:object_r:sysfs_audio:s0
 /sys/class/audiodsp/codec_fatal_err u:object_r:sysfs_audio:s0
 /sys/class/amaudio/debug u:object_r:sysfs_audio:s0
diff --git a/sepolicy/init.te b/sepolicy/init.te
index a14d792..abbbb13 100644
--- a/sepolicy/init.te
+++ b/sepolicy/init.te
@@ -56,3 +56,5 @@ allow init sysfs_cec:file { getattr open read write ioctl };

 #for cec settings
 allow init hdmicec_exec:file { getattr execute open read };
+
+allow init sysfs_video:file {write open};

I've verified, the tvp_flag can be increased to 18

Thanks,
Jason

(ALTech) JunGyu Kim

2023-12-11 17:35

developer   ~0014704

Hi Jason.

I applied your patch and I think it works fine.

Thank you for support.
Kim

(ALTech) JunGyu Kim

2023-12-27 14:10

developer   ~0014820

This modification was applied in FW 15.541.32
I close this issue.

Thank you.
Kim

(ALTech) JunGyu Kim

2024-02-08 12:15

developer   ~0015112

Hi Jason.

As you know that the UI542 is using VCS.
So we should apply this patch to 542 branch.

At 15.542.8 FW, Amlogic's patch (increase codec_mm) was applied but your patch are not applied so this patch is not work.
Please commit this patch to 542 branch.

Thank you.
Kim

(SW) Jason Ling

2024-02-15 08:17

developer   ~0015117

Hi JunGyu, YK

Can AML evaluate that this modification does not affect NTS?

Thanks,
Jason

(ALTech) Younkwang Jung

2024-02-15 08:54

developer   ~0015118

HI Jason

FW for NTS and field distribution(SKB QA) FW will proceed differently.
(There are differences for several patches.)

Until now, bitbucket UI542 was only for NTS
bitbucket UI542 will have to be configured in the form of a field deployment.

Therefore, please proceed as below.
1) Please manage the code that has been tested for NTS so far by FXN.
2) Please apply JunGyu's request
     https://btracker-cns.fii-foxconn.com/vaas/view.php?id=1846#c15112

Thank you
YK.Jung

(SW) Jason Ling

2024-02-15 11:04

developer   ~0015121

Hi YK,

1) Please manage the code that has been tested for NTS so far by FXN.
The code we tested was UI537,
From UI542, the latest request is using 15.542.8 to run full round
Not only NTS issue, I know 3rd party and AML are working on other UI/Live/VOD issue.
So if we should managed the UI542 code for NTS only, please let me know which commit is important for NTS.
Sometimes AML fixes VCS player issues (we can't confirm if this affects NTS), sometimes UI vendors fix VCS UI issues (but as you know, NTS checks iid, if we don't use the latest UI, does it affect iid related test items?)
There are too many dependencies, please let me know if you have any good ideas for managing NTS code.

2) Please apply JunGyu's request
     https://btracker-cns.fii-foxconn.com/vaas/view.php?id=1846#c15112
Done
2024-02-15 10:50:45 | jason.tf.ling@fii-.. | a9873a0 | device/amlogic/common | [BPM-25466] Set tvp_enable as 2 when bootup [2/2]
2024-02-15 10:48:48 | jason.tf.ling@fii-.. | 654e52ecd | system/core | [BPM-25466] Set tvp_enable as 2 when bootup [1/2]

Thanks,
Jason

Issue History

Date Modified Username Field Change
2023-12-07 18:24 (ALTech) JunGyu Kim New Issue
2023-12-07 18:24 (ALTech) JunGyu Kim Status new => assigned
2023-12-07 18:24 (ALTech) JunGyu Kim Assigned To => (SW) Jason Ling
2023-12-07 18:24 (ALTech) JunGyu Kim Issue Monitored: (ALTech) Younkwang Jung
2023-12-07 18:24 (ALTech) JunGyu Kim Issue Monitored: (ALTech) SY Yoon
2023-12-07 19:37 (SW) Jason Ling Note Added: 0014680
2023-12-07 19:37 (SW) Jason Ling Assigned To (SW) Jason Ling => (ALTech) JunGyu Kim
2023-12-08 09:31 (ALTech) JunGyu Kim Note Added: 0014683
2023-12-08 17:12 (SW) Jason Ling Note Added: 0014690
2023-12-08 17:13 (SW) Jason Ling Issue Monitored: (SW) Jacky Chiang
2023-12-11 15:26 (ALTech) JunGyu Kim Note Added: 0014700
2023-12-11 15:27 (ALTech) JunGyu Kim Note Edited: 0014700
2023-12-11 17:03 (SW) Jason Ling Note Added: 0014703
2023-12-11 17:35 (ALTech) JunGyu Kim Note Added: 0014704
2023-12-27 14:10 (ALTech) JunGyu Kim Status assigned => closed
2023-12-27 14:10 (ALTech) JunGyu Kim Resolution open => fixed
2023-12-27 14:10 (ALTech) JunGyu Kim Note Added: 0014820
2024-02-08 12:15 (ALTech) JunGyu Kim Assigned To (ALTech) JunGyu Kim => (SW) Jason Ling
2024-02-08 12:15 (ALTech) JunGyu Kim Status closed => feedback
2024-02-08 12:15 (ALTech) JunGyu Kim Resolution fixed => reopened
2024-02-08 12:15 (ALTech) JunGyu Kim Note Added: 0015112
2024-02-15 08:17 (SW) Jason Ling Note Added: 0015117
2024-02-15 08:54 (ALTech) Younkwang Jung Note Added: 0015118
2024-02-15 11:04 (SW) Jason Ling Note Added: 0015121
2024-02-15 11:04 (SW) Jason Ling Assigned To (SW) Jason Ling => (ALTech) Younkwang Jung
2024-04-05 13:19 (ALTech) JunGyu Kim Status feedback => closed